﻿@*安全考核项目列表*@
<script type="text/javascript">
    function delItemTr(id) {
        var title = $("#a_item_" + id).attr("title");
        var delitems = "";
        if (title == "添加该考核项") {
            delitems = $("#del_items").val().replace(id + ",", "");
            $("#del_items").val(delitems);
            $("#a_item_" + id).attr("title", "排除该考核项");
            $("#a_item_" + id).attr("class", "btnSelect");
            $("#tr_item_" + id).attr("style", "");
        }
        else {
            delitems = $("#del_items").val() + id + ",";
            $("#del_items").val(delitems);
            $("#a_item_" + id).attr("title", "添加该考核项");
            $("#a_item_" + id).attr("class", "btnDel");
            $("#tr_item_" + id).attr("style", "color: #808080");
        }
    }
    function ItemTr(id) {
        var ischeck = $("#check_" + id).attr("checked");
        if (ischeck) {
            delitems = $("#del_items").val().replace(id + ",", "");
            $("#del_items").val(delitems);
            $("#tr_item_" + id).attr("style", "");
        } else {
            delitems = $("#del_items").val() + id + ",";
            $("#del_items").val(delitems);
            $("#tr_item_" + id).attr("style", "color: #808080");
        }
    }
</script>
<table class="table" style="width: 750px;">
    <thead>
        <tr>
            <th width="30">序号</th>
            <th width="300">类别</th>
            <th width="300">考核项目</th>
            <th width="100">项目分值</th>
            <th width="40">操作</th>
        </tr>
    </thead>
    <tbody>
        @foreach (ScmAssessmentitemsInfo info in Model)
{
    string trid = "tr_item_" + info.Ai_ID;
    string aid = "a_item_" + info.Ai_ID;
    if (info.As_Include)
    {
        <tr target="sid_user" rel="@info.Ai_ID" id="@trid">
            <td>@info.Ai_POrder</td>
            <td>@info.Ai_TypeName</td>
            <td>@info.Ai_Project</td>
            <td>@info.Ai_AllScore</td>
            <td onclick="ItemTr('@info.Ai_ID')">
                <input type="checkbox" id="check_@(info.Ai_ID)" onclick="ItemTr('@info.Ai_ID')" checked="checked" />
                @*<a title="排除该考核项" id="@aid" href="javascript:delItemTr('@info.Ai_ID')" class="btnSelect"></a>*@
            </td>
        </tr>
    }
    else
    {
        <tr target="sid_user" rel="@info.Ai_ID" id="@trid" style="color: #808080">
            <td>@info.Ai_POrder</td>
            <td>@info.Ai_TypeName</td>
            <td>@info.Ai_Project</td>
            <td>@info.Ai_AllScore</td>
            <td onclick="ItemTr('@info.Ai_ID')">
                <input type="checkbox" id="check_@(info.Ai_ID)" onclick="ItemTr('@info.Ai_ID')" />
                @*<a title="添加该考核项" id="@aid" href="javascript:delItemTr('@info.Ai_ID')" class="btnDel"></a>*@
            </td>
        </tr>
    }
}
    </tbody>
</table>
